<?php

use Illuminate\Support\Facades\Route;
use Inertia\Inertia;
use App\Http\Controllers\usercontroller\UserController;
Route::prefix('user')->group(function () {
    Route::get('/login', [UserController::class, 'loginIndex']);
    Route::get('/register', [UserController::class, 'registerIndex']);
    Route::get('/push', function(){
        return Inertia::render('home/user/compontents/Push');
    });
});


Route::prefix('api')->group(function () {
    Route::post('/login', [UserController::class, 'loginUser']);
    Route::post('/register', [UserController::class, 'createUser']);
    Route::post('/logout', [UserController::class, 'logout'])->middleware('auth');;
    Route::post('/getUserInfo', [UserController::class, 'getUserInfo'])->middleware('auth');
});



